import time

from selenium.webdriver.common.by import By
from selenium.webdriver.firefox.service import Service as FirefoxService
# 自动下载对应的驱动
from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager

driver = webdriver.Firefox(service=FirefoxService(GeckoDriverManager().install()))
#最大化窗口
driver.maximize_window()
driver.get("https://www.baidu.com/")
#
driver.find_element(By.LINK_TEXT,'新闻').send_keys("selenium")
#
# for ele in driver.find_element(By.CLASS_NAME,'channel-link'):
#     print(ele.text())
#     print(type(ele))
time.sleep(10)

driver.close();